Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export curves #512

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Export curves #512

merged 1 commit into from
Aug 1, 2024

Conversation

OBrezhniev
Copy link
Member

@OBrezhniev OBrezhniev commented Jul 25, 2024

Export curves to allow terminating wasm threads (curve.terminate) from outside code.
Fixes #494 with the following changes in the bug reproduction code:

async function main() {
    const r1cs = "rsc/Multiplier.r1cs";
    const ptau = "rsc/powersOfTau28_hez_final_08.ptau";
    const zkey = "rsc/Multiplier.zkey"

    // initializes the curve object controlling wasm threads
    let curve = await snarkjs.curves.getCurveFromName("bn128");

    await snarkjs.r1cs.info(r1cs, console);
    await snarkjs.zKey.newZKey(r1cs, ptau, zkey, console);

    // terminates threads
    curve.terminate();
}

@OBrezhniev OBrezhniev merged commit 7a37590 into master Aug 1, 2024
13 checks passed
@OBrezhniev OBrezhniev deleted the chore/export-curves branch August 1, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: process is not exited after calling zKey.newZKey, r1cs.info functions
2 participants